
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta charset="utf-8" />
    <title>region &#8212; atomman 1.4.0 documentation</title>
    <link rel="stylesheet" href="_static/basic.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <script type="text/javascript" src="_static/language_data.js"></script>
    <script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
    <script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
    <script type="text/x-mathjax-config">MathJax.Hub.Config({"tex2jax": {"inlineMath": [["$", "$"], ["\\(", "\\)"]], "processEscapes": true, "ignoreClass": "document", "processClass": "math|output_area"}})</script>
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" />
    <link rel="next" title="cluster" href="atomman.cluster.html" />
    <link rel="prev" title="tools" href="atomman.tools.html" /> 
  </head><body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="atomman.cluster.html" title="cluster"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="atomman.tools.html" title="tools"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">atomman 1.4.0 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="atomman.html" accesskey="U">atomman package</a> &#187;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="region">
<h1>region<a class="headerlink" href="#region" title="Permalink to this headline">¶</a></h1>
<div class="section" id="module-atomman.region">
<span id="functions-and-attributes"></span><h2>Functions and attributes<a class="headerlink" href="#module-atomman.region" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="atomman.region.Plane">
<em class="property">class </em><code class="sig-prename descclassname">atomman.region.</code><code class="sig-name descname">Plane</code><span class="sig-paren">(</span><em class="sig-param">normal</em>, <em class="sig-param">point</em><span class="sig-paren">)</span><a class="headerlink" href="#atomman.region.Plane" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.9)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p>
<p>Class representing a plane in space. Useful for making slices.</p>
<dl class="method">
<dt id="atomman.region.Plane.above">
<code class="sig-name descname">above</code><span class="sig-paren">(</span><em class="sig-param">pos</em>, <em class="sig-param">inclusive=False</em><span class="sig-paren">)</span><a class="headerlink" href="#atomman.region.Plane.above" title="Permalink to this definition">¶</a></dt>
<dd><p>Indicates if position(s) are above the plane.  Note that identifying
points as above or below is dependent on the sign of the plane normal.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>pos</strong> (<em>array-like object</em>) – Nx3 array of coordinates.</p></li>
<li><p><strong>inclusive</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.9)"><em>bool</em></a><em>, </em><em>optional</em>) – Indicates if points in the plane are to be included.
Default value is False.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>N array of bool values: True if above the plane</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>numpy.NDArray</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="atomman.region.Plane.below">
<code class="sig-name descname">below</code><span class="sig-paren">(</span><em class="sig-param">pos</em>, <em class="sig-param">inclusive=True</em><span class="sig-paren">)</span><a class="headerlink" href="#atomman.region.Plane.below" title="Permalink to this definition">¶</a></dt>
<dd><p>Indicates if position(s) are below the plane.  Note that identifying
points as above or below is dependent on the sign of the plane normal.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>pos</strong> (<em>array-like object</em>) – Nx3 array of coordinates.</p></li>
<li><p><strong>inclusive</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.9)"><em>bool</em></a><em>, </em><em>optional</em>) – Indicates if points in the plane are to be included.
Default value is True.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>N array of bool values: True if below the plane</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>numpy.NDArray</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="atomman.region.Plane.normal">
<em class="property">property </em><code class="sig-name descname">normal</code><a class="headerlink" href="#atomman.region.Plane.normal" title="Permalink to this definition">¶</a></dt>
<dd><p>3D normal unit vector of the plane.</p>
<dl class="field-list simple">
<dt class="field-odd">Type</dt>
<dd class="field-odd"><p>numpy.NDArray</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="atomman.region.Plane.point">
<em class="property">property </em><code class="sig-name descname">point</code><a class="headerlink" href="#atomman.region.Plane.point" title="Permalink to this definition">¶</a></dt>
<dd><p>a 3D vector position on the plane.</p>
<dl class="field-list simple">
<dt class="field-odd">Type</dt>
<dd class="field-odd"><p>numpy.NDArray</p>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="atomman.region.PlaneSet">
<em class="property">class </em><code class="sig-prename descclassname">atomman.region.</code><code class="sig-name descname">PlaneSet</code><span class="sig-paren">(</span><em class="sig-param">planes</em><span class="sig-paren">)</span><a class="headerlink" href="#atomman.region.PlaneSet" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">atomman.region.Shape.Shape</span></code></p>
<p>Class consisting of a shape defined by a set of planes</p>
<dl class="method">
<dt id="atomman.region.PlaneSet.inside">
<code class="sig-name descname">inside</code><span class="sig-paren">(</span><em class="sig-param">pos</em>, <em class="sig-param">inclusive=True</em><span class="sig-paren">)</span><a class="headerlink" href="#atomman.region.PlaneSet.inside" title="Permalink to this definition">¶</a></dt>
<dd><p>Indicates if position(s) are inside the shape.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>pos</strong> (<em>array-like object</em>) – Nx3 array of coordinates.</p></li>
<li><p><strong>inclusive</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.9)"><em>bool</em></a><em>, </em><em>optional</em>) – Indicates if points on the shape’s boundaries are to be included.
Default value is True.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>N array of bool values: True if inside shape</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>numpy.NDArray</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="atomman.region.PlaneSet.planes">
<em class="property">property </em><code class="sig-name descname">planes</code><a class="headerlink" href="#atomman.region.PlaneSet.planes" title="Permalink to this definition">¶</a></dt>
<dd><p>The planes that make up the shape</p>
<dl class="field-list simple">
<dt class="field-odd">Type</dt>
<dd class="field-odd"><p>list of atomman.region.Plane</p>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="atomman.region.Sphere">
<em class="property">class </em><code class="sig-prename descclassname">atomman.region.</code><code class="sig-name descname">Sphere</code><span class="sig-paren">(</span><em class="sig-param">center</em>, <em class="sig-param">radius</em><span class="sig-paren">)</span><a class="headerlink" href="#atomman.region.Sphere" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">atomman.region.Shape.Shape</span></code></p>
<p>Class representing a sphere in space.</p>
<dl class="method">
<dt id="atomman.region.Sphere.center">
<em class="property">property </em><code class="sig-name descname">center</code><a class="headerlink" href="#atomman.region.Sphere.center" title="Permalink to this definition">¶</a></dt>
<dd><p>3D vector position of sphere’s center</p>
<dl class="field-list simple">
<dt class="field-odd">Type</dt>
<dd class="field-odd"><p>numpy.NDArray</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="atomman.region.Sphere.inside">
<code class="sig-name descname">inside</code><span class="sig-paren">(</span><em class="sig-param">pos</em>, <em class="sig-param">inclusive=True</em><span class="sig-paren">)</span><a class="headerlink" href="#atomman.region.Sphere.inside" title="Permalink to this definition">¶</a></dt>
<dd><p>Indicates if position(s) are inside the shape.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>pos</strong> (<em>array-like object</em>) – Nx3 array of coordinates.</p></li>
<li><p><strong>inclusive</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.9)"><em>bool</em></a><em>, </em><em>optional</em>) – Indicates if points on the shape’s boundaries are to be included.
Default value is True.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>N array of bool values: True if inside shape</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>numpy.NDArray</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="atomman.region.Sphere.radius">
<em class="property">property </em><code class="sig-name descname">radius</code><a class="headerlink" href="#atomman.region.Sphere.radius" title="Permalink to this definition">¶</a></dt>
<dd><p>the sphere’s radius</p>
<dl class="field-list simple">
<dt class="field-odd">Type</dt>
<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.9)">float</a></p>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="atomman.region.Cylinder">
<em class="property">class </em><code class="sig-prename descclassname">atomman.region.</code><code class="sig-name descname">Cylinder</code><span class="sig-paren">(</span><em class="sig-param">center1</em>, <em class="sig-param">center2</em>, <em class="sig-param">radius</em>, <em class="sig-param">endcaps=True</em><span class="sig-paren">)</span><a class="headerlink" href="#atomman.region.Cylinder" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">atomman.region.Shape.Shape</span></code></p>
<p>Class representing a cylinder in space.</p>
<dl class="method">
<dt id="atomman.region.Cylinder.axis">
<em class="property">property </em><code class="sig-name descname">axis</code><a class="headerlink" href="#atomman.region.Cylinder.axis" title="Permalink to this definition">¶</a></dt>
<dd><p>3D unit vector parallel to cylinder axis.</p>
<dl class="field-list simple">
<dt class="field-odd">Type</dt>
<dd class="field-odd"><p>numpy.NDArray</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="atomman.region.Cylinder.center1">
<em class="property">property </em><code class="sig-name descname">center1</code><a class="headerlink" href="#atomman.region.Cylinder.center1" title="Permalink to this definition">¶</a></dt>
<dd><p>3D vector position of one cylinder end</p>
<dl class="field-list simple">
<dt class="field-odd">Type</dt>
<dd class="field-odd"><p>numpy.NDArray</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="atomman.region.Cylinder.center2">
<em class="property">property </em><code class="sig-name descname">center2</code><a class="headerlink" href="#atomman.region.Cylinder.center2" title="Permalink to this definition">¶</a></dt>
<dd><p>3D vector position of one cylinder end</p>
<dl class="field-list simple">
<dt class="field-odd">Type</dt>
<dd class="field-odd"><p>numpy.NDArray</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="atomman.region.Cylinder.endcaps">
<em class="property">property </em><code class="sig-name descname">endcaps</code><a class="headerlink" href="#atomman.region.Cylinder.endcaps" title="Permalink to this definition">¶</a></dt>
<dd><p>indicates if the endcaps are included in inside/outside determination</p>
<dl class="field-list simple">
<dt class="field-odd">Type</dt>
<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.9)">bool</a></p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="atomman.region.Cylinder.inside">
<code class="sig-name descname">inside</code><span class="sig-paren">(</span><em class="sig-param">pos</em>, <em class="sig-param">inclusive=True</em><span class="sig-paren">)</span><a class="headerlink" href="#atomman.region.Cylinder.inside" title="Permalink to this definition">¶</a></dt>
<dd><p>Indicates if position(s) are inside the shape.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>pos</strong> (<em>array-like object</em>) – Nx3 array of coordinates.</p></li>
<li><p><strong>inclusive</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.9)"><em>bool</em></a><em>, </em><em>optional</em>) – Indicates if points on the shape’s boundaries are to be included.
Default value is True.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>N array of bool values: True if inside shape</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>numpy.NDArray</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="atomman.region.Cylinder.radius">
<em class="property">property </em><code class="sig-name descname">radius</code><a class="headerlink" href="#atomman.region.Cylinder.radius" title="Permalink to this definition">¶</a></dt>
<dd><p>the cylinder’s radius</p>
<dl class="field-list simple">
<dt class="field-odd">Type</dt>
<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.9)">float</a></p>
</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="atomman.region.Shape">
<em class="property">class </em><code class="sig-prename descclassname">atomman.region.</code><code class="sig-name descname">Shape</code><a class="headerlink" href="#atomman.region.Shape" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.9)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p>
<p>Template class for defining geometric regions in space.</p>
<dl class="method">
<dt id="atomman.region.Shape.inside">
<code class="sig-name descname">inside</code><span class="sig-paren">(</span><em class="sig-param">pos</em>, <em class="sig-param">inclusive=True</em><span class="sig-paren">)</span><a class="headerlink" href="#atomman.region.Shape.inside" title="Permalink to this definition">¶</a></dt>
<dd><p>Indicates if position(s) are inside the shape.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>pos</strong> (<em>array-like object</em>) – Nx3 array of coordinates.</p></li>
<li><p><strong>inclusive</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.9)"><em>bool</em></a><em>, </em><em>optional</em>) – Indicates if points on the shape’s boundaries are to be included.
Default value is True.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>N array of bool values: True if inside shape</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>numpy.NDArray</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="atomman.region.Shape.outside">
<code class="sig-name descname">outside</code><span class="sig-paren">(</span><em class="sig-param">pos</em>, <em class="sig-param">inclusive=False</em><span class="sig-paren">)</span><a class="headerlink" href="#atomman.region.Shape.outside" title="Permalink to this definition">¶</a></dt>
<dd><p>Indicates if position(s) are inside the shape.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>pos</strong> (<em>array-like object</em>) – Nx3 array of coordinates.</p></li>
<li><p><strong>inclusive</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.9)"><em>bool</em></a><em>, </em><em>optional</em>) – Indicates if points on the shape’s boundaries are to be included.
Default value is False.</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>N array of bool values: True if outside shape</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p>numpy.NDArray</p>
</dd>
</dl>
</dd></dl>

</dd></dl>

</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h3><a href="index.html">Table of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">region</a><ul>
<li><a class="reference internal" href="#module-atomman.region">Functions and attributes</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="atomman.tools.html"
                        title="previous chapter">tools</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="atomman.cluster.html"
                        title="next chapter">cluster</a></p>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="atomman.cluster.html" title="cluster"
             >next</a> |</li>
        <li class="right" >
          <a href="atomman.tools.html" title="tools"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">atomman 1.4.0 documentation</a> &#187;</li>
          <li class="nav-item nav-item-1"><a href="atomman.html" >atomman package</a> &#187;</li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.2.0.
    </div>
  </body>
</html>